﻿<html xmlns:th="http://www.thymeleaf.org">
<head th:include="basepage/head::head"></head>
<body>
<div id="page-wrapper" class="page-loading">
    <div class="preloader">
        <div class="inner">
            <!-- Animation spinner for all modern browsers -->
            <div class="preloader-spinner themed-background hidden-lt-ie10"></div>

            <!-- Text for IE9 -->
            <h3 class="text-primary visible-lt-ie10"><strong>Loading..</strong></h3>
        </div>
    </div>
    <div id="page-container" class="header-fixed-top sidebar-visible-lg-full">
        <header th:include="basepage/left::left"></header>
        <!--主要内容 START-->
        <div id="main-container" class="main-content">
<header th:include="basepage/header::header"></header>
<div id="page-content">

	<!--小的第一排-->
	<div class="block">
		<div class="row" style="margin-bottom: 20px;">
			<form id="addServiceForm" method="post" class="form-horizontal form-bordered " onsubmit="return false;">
			<fieldset>
				 <div class="form-group">
						 <label class="col-sm-2 control-label" for="cu_name">服务名称:</label>
						 <div class="col-sm-4">
						    <input class="form-control" name="name" type="text" placeholder="服务名称" th:value="${service.name}"/>
						    <input class="form-control" name="id" type="hidden" th:value="${service.id}"/>
						 </div>
				 </div>
				 <div class="form-group">
						 <label class="col-sm-2 control-label" for="cu_name">功能:</label>
						 <div class="col-sm-4">
						    <input class="form-control" name="forwhat" type="text" placeholder="功能" th:value="${service.forwhat}"/>
						 </div>
				 </div>
				 <div class="form-group">		
						 <label class="col-sm-2 control-label" for="trun_name">服务所在ip：</label>
						 <div class="col-sm-4">
						    <input class="form-control"  name="serviceIp" type="text" placeholder="服务所在ip" th:value="${service.serviceIp}"/>
						 </div>
				 </div>
				 <div class="form-group">		
						 <label class="col-sm-2 control-label" for="trun_name">服务端口：</label>
						 <div class="col-sm-4">
						    <input class="form-control"  name="port" type="text" placeholder="服务端口" th:value="${service.port}"/>
						 </div>
				 </div>
				 <div class="form-group">		
						 <label class="col-sm-2 control-label" for="trun_name">启动命令：</label>
						 <div class="col-sm-4">
						    <input class="form-control"  name="startcommand" type="text" placeholder="服务启动命令行  多条命令用&&割开" th:value="${service.startcommand}"/>
						 </div>
				 </div>
				 <div class="form-group">		
						 <label class="col-sm-2 control-label" for="trun_name">关闭命令：</label>
						 <div class="col-sm-4">
						    <input class="form-control"  name="stopcommand" type="text" placeholder="例：./stopServer1.sh && service Server2 stop" th:value="${service.stopcommand}"/>
						 </div>
				 </div>
				 <div class="form-group">		
						 <label class="col-sm-2 control-label" for="trun_name">运行命令所在目录：</label>
						 <div class="col-sm-4">
						    <input class="form-control"  name="path" type="text" placeholder="运行上一栏中命令行所在目录，非必填" th:value="${service.path}"/>
						 </div>
				 </div>
				 <div class="form-group">
					 <label class="col-sm-2 control-label" for="hd_address">自动重启尝试次数：</label>
					 <div class="col-sm-4">
					    <input class="form-control"  name="needTimes" type="text" placeholder="自动重启尝试次数" th:value="${service.needTimes}"/>
					 </div>
				 </div>
				 <div class="form-group">
					 <label class="col-sm-2 control-label" for="hd_address">自动重启失败后报警次数：</label>
					 <div class="col-sm-4">
					    <input class="form-control"  name="needAlertTimes" type="text" placeholder="自动重启失败后报警次数" th:value="${service.needAlertTimes}"/>
					 </div>
				 </div>
				 <div class="form-group">
					 <label class="col-sm-2 control-label" for="hd_address">通知对象：</label>
					 <div class="col-sm-4">
					    <input class="form-control"  name="alertName" type="text" placeholder="通知对象" th:value="${service.alertName}"/>
					 </div>
				 </div>
				 <div class="form-group">
					 <label class="col-sm-2 control-label" for="hd_address">备注：</label>
					 <div class="col-sm-4">
					    <input class="form-control"  name="remark" type="text" placeholder="备注" th:value="${service.remark}"/>
					 </div>
				 </div>
				 <div class="col-sm-4">
					<div class="form-actions ">
						<button class="btn btn-primary" style="float: right; margin-top: 20px;" onclick="form_submit_onclick('addServiceForm','addAlertService')">提交</button>
					</div>
				 </div>
			</fieldset>
			</form>
		</div>
	</div>
</div>
    <!-- END Page Content -->
        </div>
        <!--主要内容 END-->
        <!-- END Main Container -->
    </div>
    <!-- END Page Container -->
</div>
<!-- END Page Wrapper -->
<header th:include="basepage/footer::footer"></header>
<script type="text/javascript">
     $("#service_left").addClass("open");
     $("#service_add").addClass("active");
</script>
</body>
</html>